import { alova } from '@/service/request';

/** get StorageConfig page */
export function paginateStorageConfig(params?: Api.SearchParams) {
  return alova.Get<Api.PageRow>('/infra/storage/storageConfig/paginate', {
    params
  });
}

/** get all StorageConfig */
export function listStorageConfig() {
  return alova.Get<Api.Row[]>('/infra/storage/storageConfig/list');
}

/** create StorageConfig */
export function createStorageConfig(data?: Api.Model) {
  return alova.Post<boolean>('/infra/storage/storageConfig/create', data);
}

/** update StorageConfig */
export function updateStorageConfig(data?: Api.Model) {
  return alova.Post<boolean>('/infra/storage/storageConfig/update', data);
}

/** delete StorageConfig */
export function deleteStorageConfig(params: Api.DeleteParams) {
  return alova.Post<boolean>('/infra/storage/storageConfig/delete', undefined, { params });
}

/** delete StorageConfig */
export function batchDelStorageConfig(params: Api.BatchDeleteParams) {
  return alova.Post<boolean>('/infra/storage/storageConfig/batchDel', undefined, { params });
}
